﻿countDown();
function countDown(n){
	var count = 0;
	var midTime = 43200;
	count = setInterval(function(){
		midTime--;
		h = parseInt( midTime / 3600),
		m = parseInt(( midTime - h*3600) / 60),
		s = parseInt( midTime - h*3600 - m*60);
		if(h<10)
		{
			h= '0'+h;
		}
		if(m<10)
		{
			m= '0'+m;
		}
		if(s<10)
		{
			s= '0'+s;
		}
		$('.timew .h').text(h);$('.timew .m').text(m);$('.timew .s').text(s);
	},1000)
}

var isture = true;
$(".zk").click(function(){
	if(isture){
		$(this).prev().css("height","auto");
		$(this).html("收起全部∧");
		 isture = false;
	}else{
		$(this).prev().css("height","");
		$(this).html("展开全部∨");
		isture = true;
	}		
});


$(function(){
	window.onscroll = function(e){
		var scrollTop = $(document).scrollTop();
		var boxTop=$(".centent").offset().top;
		if(scrollTop<boxTop){
			console.log("开始");
			$(".mfst").css({
				"position":"static",
				"top":"0",
				"margin-left":"0",
				"z-index":"1",
			});
			$(".related").css({
				"margin-top":"40px"
			});
		}else{
			$(".mfst").css({
				"position":"fixed",
				"top":"0",
				"bottom":"unset",
				"z-index":"1",
			});
			$(".centent .centent-r .related").css({
				"margin-top":"440px"
			});
		}
		
		var rightTop=$(".mfst").offset().top;
		var bottomTop=$(".introduce").offset().top;
		var rightHeight=$(".mfst").height();
		var rightBottomTop=rightTop+rightHeight;
		var cc = $("centent").height();
		if( rightBottomTop>bottomTop ){
			console.log("滚到底部了")
			$(".mfst").css({
				"position":"absolute",
				"top":"unset",
				"bottom":"0px",
				"z-index":"1",
			});
			return;
		}
	}
})

$(".fs2 input").eq(0).addClass("user-name");
$(".fs2 input").eq(1).addClass("user-tel");
if($('.defaults_dataid').size()>0){
				
				theaMsForm($('.sign-in2'))
			}